#ifndef _XHTMLPLAYER_H
#define _XHTMLPLAYER_H

#include <qwidget.h>
#include <qstring.h>
#include <qvector.h>

class QWebView;
class QWebFrame;

class XHtmlPlayer : public QWidget
{
	Q_OBJECT

public:
	XHtmlPlayer(QWidget *parent=0, Qt::WFlags f=0);

	void setPlayerGeometry(const int startX, const int startY, const int width, const int height);
	void playHtml(const char* file, const int timeout, const int index) ;
	int  stopPlay();

signals:
	void sgPlayHtmlDone(int index);

public slots:
	void onHtmlPlayDone();
	void onLoadFinished(bool);

private:
	int  m_timeout;
	int  m_index;

	QTimer 		*m_tmShortPage;
	QWebView 	*m_webview;
	QWebFrame   *m_webframe;
	enum EUpdateList {
		EUpdateRoutineList = -10,
		EUpdatePluList,
	};
};
#endif
